<?php

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/

$factory->define(App\User::class, function (Faker\Generator $faker) {
    return [
        'name' => $faker->name,
        'email' => $faker->safeEmail,
        'password' => bcrypt(str_random(10)),
        'remember_token' => str_random(10),
    ];
});

$factory->define(App\Client::class, function (Faker\Generator $faker){
    $fk = Faker\Factory::create('zh_CN');
    return [
        'name' => $fk->name,
        'gender' => $fk->randomElement(['男','女']),
        'birth_date' => $fk->date('Y-m-d','2000-01-01'),
        'come_from' => $fk->randomElement(['北京','上海','昆明','成都','广州','南宁'])
    ];
});